<template>
  <div>
    <div>
      <el-button type="primary" @click="dialogFormVisible = true"
        >+主要按钮</el-button
      >
    </div>
    <div>
      <el-dialog title="新增" :visible.sync="dialogFormVisible">
        <el-form :model="form">

          <el-form-item label="组织名称" :label-width="formLabelWidth">
            <el-input v-model="name" autocomplete="off"></el-input>
          </el-form-item>

          <el-form-item label="组织类型 ">
            <el-radio v-model="radio" label="1">组织</el-radio>
            <el-radio v-model="radio" label="2">部门</el-radio>
          </el-form-item>

          <el-form-item label="组织缩写" :label-width="formLabelWidth">
            <el-input v-model="name" autocomplete="off"></el-input>
          </el-form-item>

          <el-form-item label="组织排序 ">
            <el-input-number
              v-model="num"
              controls-position="right"
              @change="handleChange"
              :min="1"
              :max="10"
            ></el-input-number>
          </el-form-item>
          
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogFormVisible = false">关闭</el-button>
          <el-button type="primary" @click="dialogFormVisible = false"
            >确定</el-button
          >
        </div>
      </el-dialog>
    </div>

    <div>
      <template>
        <el-table :data="like" style="width: 100%">
          <!-- <el-checkbox v-model="checked"></el-checkbox> -->
          <el-table-column prop="id" label="组织名称" width="180" align="center">
          </el-table-column>
          <el-table-column prop="rname" label="组织编码" width="180" align="center">
          </el-table-column>
          <el-table-column prop="pip" label="组织类型" width="180" align="center">
          </el-table-column>
           <el-table-column prop="create_time" label="组织排序" width="180" align="center">
          </el-table-column>
          <button>编辑</button>
        </el-table>
      </template>
    </div>

  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      dialogTableVisible: false,
      dialogFormVisible: false,
      name: "",
      num: "1",
      radio: "1",
      liek:[],
    };
  },
  props: {},

  components: {},

  created() {},

  mounted() {
        axios
      .get("http://127.0.0.1:8010/api/mall/v1/admin/role/add/role")
      .then((result) => {
        this.like = result.data.data.items;
        console.log(result);
      })
      .catch((err) => {
        console.log(err);
      });
  },

  methods: {},

  computed: {},

  watch: {},

  directives: {},

  filters: {},
};
</script>

<style scoped>
* {
  margin: 0;
}
</style>
